﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OnlineLogCommon
{
    public enum PacketType
    {
        /// <summary>
        /// 字符串
        /// </summary>
        String = 1,
        /// <summary>
        /// 二进制流
        /// </summary>
        Binary = 2,
        /// <summary>
        /// 序列化对象
        /// </summary>
        Complex = 3
    }
    /// <summary>
    /// size : 12
    /// </summary>
    public struct Packet
    {
        public int Version { get; set; }
        public int Length { get; set; }
        public PacketType PacketType { get; set; }

        public override string ToString()
        {
            return String.Format("V:{0},L:{1},T:{2}.", Version, Length, (int)PacketType);
        }
    }
}
